﻿using System;
using System.Runtime.CompilerServices;
using UnityEngine;

[RequireComponent(typeof(Renderer))]
public class VisibilityListener : MonoBehaviour
{
    [CompilerGenerated]
    private static Action <>f__am$cache2;
    [CompilerGenerated]
    private static Action <>f__am$cache3;
    public Action onBecameInvisible;
    public Action onBecameVisible;

    public VisibilityListener()
    {
        if (<>f__am$cache2 == null)
        {
            <>f__am$cache2 = new Action(VisibilityListener.<onBecameVisible>m__158);
        }
        this.onBecameVisible = <>f__am$cache2;
        if (<>f__am$cache3 == null)
        {
            <>f__am$cache3 = new Action(VisibilityListener.<onBecameInvisible>m__159);
        }
        this.onBecameInvisible = <>f__am$cache3;
    }

    [CompilerGenerated]
    private static void <onBecameInvisible>m__159()
    {
    }

    [CompilerGenerated]
    private static void <onBecameVisible>m__158()
    {
    }

    private void OnBecameInvisible()
    {
        if (this.onBecameInvisible != null)
        {
            this.onBecameInvisible();
        }
    }

    private void OnBecameVisible()
    {
        if (this.onBecameVisible != null)
        {
            this.onBecameVisible();
        }
    }
}

